package Dispatcher;

public class ElevatorStatus {
	private int id;
	private int state;
	private int currentFloor;
	private int nextFloor;
	private int direction;
	private int destinationCount;

	public ElevatorStatus(int id, int state, int currentFloor, int nextFloor,
			 int destinationCount) {
		this.id = id;
		this.currentFloor = currentFloor;
		this.nextFloor = nextFloor;
		this.setState(state);
		this.calculateDirection();
		this.destinationCount = destinationCount;
	}

	private void calculateDirection() {
		this.setDirection(this.nextFloor - this.currentFloor);
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getCurrentFloor() {
		return currentFloor;
	}

	public void setCurrentFloor(int currentFloor) {
		this.currentFloor = currentFloor;
	}

	public int getNextFloor() {
		return nextFloor;
	}

	public void setNextFloor(int nextFloor) {
		this.nextFloor = nextFloor;
	}

	public int getDestinationCount() {
		return destinationCount;
	}

	public void setDestinationCount(int destinationCount) {
		this.destinationCount = destinationCount;
	}

	public int getDirection() {
		return direction;
	}

	public void setDirection(int direction) {
		this.direction = direction;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}
}
